<template>
    <div id="app">
        <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
        </keep-alive>
        <router-view v-if="!$route.meta.keepAlive"></router-view>
    </div>
</template>

<script>
export default {
    data(){
        return {
            transname:'router-fade',
            modes:'out-in'
        }
    },
    
    mounted(){
        let self = this;
        if(parseInt(sessionStorage.uid)>0){
                $.ajax({
						type: 'GET',
						url:' http://card.adouyun.com/CloudCard/dynamic/findDynamicByUid.shtml?sessionid='+sessionStorage.sid,
						dataType: 'json',
						data: {},
						success: function (data) {
							self.$store.commit('changeNewData',{val:data.data});
						},
						error: function (error) {
							throw new Error(error)
						}
					})
				setInterval(function(){
					$.ajax({
						type: 'GET',
						url:' http://card.adouyun.com/CloudCard/dynamic/findDynamicByUid.shtml?sessionid='+sessionStorage.sid,
						dataType: 'json',
						data: {},
						success: function (data) {
							self.$store.commit('changeNewData',{val:data.data});
						},
						error: function (error) {
							throw new Error(error)
						}
					})
				},60*1000)
			}
    },
    methods:{

    },
}
</script>

<style>
.ql-container{
        padding-top: 3rem;
    }
#app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /*text-align: center;*/
    color: #2c3e50;
    word-wrap: break-word;
    /* height: 100%; */
}
.el-message{ top: 0px !important;}
.ql-size-small {
    font-size: 0.75em;
}
.ql-size-large {
    font-size: 1.5em;
}
.ql-align-center{
    text-align: center;
}
.ql-align-right{
    text-align: right;
}
.ql-align-justify{
    text-align:justify;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
    right: 0;
}
.fl {
    display: block;
    float: left;
}
.fr {
    display: block;
    float: right;
}
.clarefix:before,.clarefix:after{content: '';clear: both;display: block;height: 0;width: 0;}
.clearfix:before,.clearfix:after{content: '';clear: both;display: block;height: 0;width: 0;}
.head-right{
    position: fixed;
    top: 0;
    right: 0;
    text-align: center;
    font-size: 1.25rem;
    line-height: 44px;
}    
.changeColor i,.changeColor p{
    color:#aaaaaa !important;
}
.sendBox{
    box-sizing: border-box;
}
.textReply{
    width: 100%;
    border: none;
    border-radius: 0.5rem;
    height: 8rem;
    padding:1rem;
    font-size: 1rem;
    color:#666666;
    box-sizing: border-box;
}
.csboth{
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #d6d6d6;
    height: 3rem;
    line-height: 3rem;
}
.csboth span{
    margin-left:1rem;
}
textarea{outline:none}
textarea{resize:none}

.zaning{
    color:#ddd;
}
</style>
